package user;

import book.BookList;
import operation.IBooks;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lenovo
 * Date: 2024-06-04
 * Time: 22:13
 */
public abstract class Users {
    protected String name;
    public IBooks[] books;

    public Users(String name) {
        this.name = name;
    }

    public abstract int menu();

    public void doOperation(int choice,BookList booklist){
        try{
            books[choice].work(booklist);
        }catch (Exception e){
            System.out.println("输入错误！");
        }
    }
}
